using System;
using System.Collections.Generic;
using ContentRenderingApi.NodeData;

namespace ContentRenderingApi.Node
{
    /// <summary/>
    internal abstract class AbstractNode 
    {
        private AbstractNode _parent;

        /// <summary/>
        internal AbstractNode(AbstractNode parent)
        {
            this._parent = parent;
        }

        /// <summary/>
        internal abstract AbstractNode AddParentSubstitutionTag(int level);

        /// <summary/>
        internal abstract AbstractNode AddParentTransparentTag(int level);

        /// <summary/>
        internal abstract AbstractNode AddParentIfTag(int level);

        /// <summary/>
        internal abstract AbstractNode AddParentIfNotTag(int level);

        /// <summary/>
        internal abstract void AddParentOutputTag(int level);

        /// <summary/>
        internal abstract AbstractNode AddChildSubstitutionTag(string name);

        /// <summary/>
        internal abstract AbstractNode AddChildTransparentTag(string name);

        /// <summary/>
        internal abstract AbstractNode AddChildIfTag(string name);

        /// <summary/>
        internal abstract AbstractNode AddChildIfNotTag(string name);

        /// <summary/>
        internal abstract void AddChildOutputTag(string name);

        /// <summary/>
        internal abstract AbstractNode AddRootSubstitutionTag(string name);

        /// <summary/>
        internal abstract AbstractNode AddRootTransparentTag(string name);

        /// <summary/>
        internal abstract AbstractNode AddRootIfTag(string name);

        /// <summary/>
        internal abstract AbstractNode AddRootIfNotTag(string name);

        /// <summary/>
        internal abstract void AddRootOutputTag(string name);

        /// <summary/>
        internal abstract void AddContent(string content);

        /// <summary/>
        internal AbstractNode Parent 
        { 
            get { return this._parent; }
        }
        
        /// <summary/>
        internal abstract bool IsContent();

        /// <summary/>
        internal abstract bool IsOutputTag();

        /// <summary/>
        internal abstract bool IsSubstitutionTag();
        
        /// <summary/>
        internal abstract bool IsTransparentTag();

        /// <summary/>
        internal abstract bool IsIfTag();

        /// <summary/>
        internal abstract bool IsIfNotTag();

        /// <summary/>
        internal abstract bool IsParentTag();

        /// <summary/>
        internal abstract bool IsRootTag();

        /// <summary/>
        internal abstract bool IsChildTag();

        /// <summary/>
        internal abstract string Name { get; }

        /// <summary/>
        internal abstract int ParentLevel { get; }

        /// <summary/>
        internal abstract string Content { get; }

        /// <summary/>
        internal abstract IEnumerator<AbstractNode> FetchChildNodes();     
    }
}
